package com.st.lwb.daoimpl;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class ContactDao extends SQLiteOpenHelper {

	public ContactDao(Context context) {
		super(context, "lwbContact.db", null, 1);
	}
//	private int contactId;
//	private String displayName;
//	private String phoneNum;
//	private String email;
//	private String address;
//	private String lunarBirthday;
//	private String website;
//	private String organization;
//	private String note;
//	private Long photoId;
//	private String sortKey;
//	private String lookUpKey;
//	private int selected = 0;
//	private String formattedNumber;
//	private String pinyin;
//	
	@Override
	public void onCreate(SQLiteDatabase db) {
		String command = "CREATE TABLE lwbcontact(contactId INTEGER,displayName VARCHAR(50),phoneNum VARCHAR(50)" +
				",email VARCHAR(50),address VARCHAR(50),lunarBirthday VARCHAR(50),website VARCHAR(50)," +
				"organization VARCHAR(50),note VARCHAR(50),photoId Integer,sortKey VARCHAR(50),lookUpKey VARCHAR(50)," +
				"selected Integer,formattedNumber VARCHAR(50),pinyin VARCHAR(50))";
		db.execSQL(command);
	}

	@Override
	public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
		Log.v("larson", " dbhelper _updated");
	}

}
